package com.misboot.document.model;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;


@Table(name = "w_user_acl_t")
public class UserAclEntity   {

    @Id
    private Long id;
    private String userId;
    private String fileId;

    private String permission = "read";

    // 用户权限
    @Column(name = "re_name")
    private int rename = 0; //重命名权限，1为打开该权限，0为关闭该权限，默认为0
    private int history = 0; //历史版本权限，1为打开该权限，0为关闭该权限,默认为1

    public UserAclEntity() {
        super();
    }

    public UserAclEntity(String userId, String fileId) {
        this.userId = userId;
        this.fileId = fileId;
        this.permission = "write";
        this.rename = 1;
        this.history = 1;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public int getRename() {
        return rename;
    }

    public void setRename(int rename) {
        this.rename = rename;
    }

    public int getHistory() {
        return history;
    }

    public void setHistory(int history) {
        this.history = history;
    }
}
